package demo3;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-11-12  20:10
 */

//机器人判分系统要求必须如下规则：
// 1： 不能有package关键字
// 2： 类名必须是Main

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner Scanner = new Scanner(System.in);
        int a = Scanner.nextInt();
        int b = Scanner.nextInt();
        if(a > 0 && a < 8) {
            if(a + b > 7) {
                System.out.println( (a+b)  % 7);
            }else {
                System.out.println(a+b);
            }
        }
    }
}

